package com.observer;

public class Main {
    public static void main(String[] args) {
        ConcreteSubject concreteSubject = new ConcreteSubject();
        concreteSubject.attach(new ConcreteObserver("x",concreteSubject));
        concreteSubject.attach(new ConcreteObserver("y",concreteSubject));
        concreteSubject.attach(new ConcreteObserver("z",concreteSubject));
        concreteSubject.setSubjectState("abc");
        concreteSubject.notifyData();
    }
}
